{% extends "personal_center/zichan_base.html" %}
{#资产登记页#}
{% block page_link %}
    <link rel="stylesheet" href="../../static/system_setup/css/style.css">
{% endblock %}

{% block style %}
    <style>
        .add_class {
            background: #1E90FF;
        }

        .file {
            position: relative;
            display: inline-block;
            background: #D0EEFF;
            border: 1px solid #99D3F5;
            border-radius: 4px;
            padding: 4px 12px;
            overflow: hidden;
            color: #1E88C7;
            text-decoration: none;
            text-indent: 0;
            line-height: 20px;
        }

        .file input {
            position: absolute;
            font-size: 100px;
            right: 0;
            top: 0;
            opacity: 0;
        }

        .file:hover {
            background: #AADFFD;
            border-color: #78C3F3;
            color: #004974;
            text-decoration: none;
        }

        #title {
            display: flex;
            justify-content: space-between;
            box-sizing: border-box;
            padding: 0 10px;
            height: 50px;
            color: #0b0b0b;
            cursor: move;
            /*border: #dfdfdf solid 1px;*/
            width: 100%;
            background: #f4f7fa;
            border-top-left-radius: 5px;
            border-top-right-radius: 5px;
        }

        .top_tag {
            border-bottom: #01AAED solid 2px;
            color: #01AAED;
        }

        .tab_top {
            width: 100px;
            height: 40px;
            line-height: 40px;
            text-align: center;
            display: inline-block;
            cursor: pointer;
        }

        tr {
            height: 37px;
        }
    </style>
{% endblock %}

{% block right_content %}
    <div class="headline">
        <div class="tab_top top_tag">资产详情</div>
    </div>
    <div style="width: 100%; height: auto;min-height: 95%; padding: 20px 15% 0 15%; background: #FFFFFF">
        <table style="border-collapse: collapse;border-color: #DCDCDC;" cellspacing="0" cellpadding="2" width="100%"
               border="1">
            <tr>
                <td style="text-align: right; padding-right: 15px">登&nbsp;&nbsp;记&nbsp;&nbsp;人</td>
                <td style="padding-left: 5px;">{{ realname }}</td>
            </tr>
            <tr>
                <td style="text-align: right; padding-right: 15px">部&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;门</td>
                <td style="padding-left: 5px;">{{ department }}</td>
            </tr>
            <tr>
                <td style="text-align: right; padding-right: 15px">资产名称</td>
                <td style="padding-left: 5px" id="select_depart">{{ obj.product.name }}</td>
            </tr>
            <tr>
                <td style="text-align: right; padding-right: 15px">资产类型</td>
                <td>
                    <input id="product_type" type="text"
                           style="width: 100%;height: 100%;border: none;padding-left: 5px; background: #FFFFFF"
                           value="{{ obj.type }}" disabled>
                </td>
            </tr>
            <tr>
                <td style="text-align: right; padding-right: 15px">资产数量</td>
                <td>
                    <input id="quantity" type="number" disabled
                           style="background: #FFFFFF;width: 100%;height: 100%;border: none;padding-left: 5px"
                           value="{{ obj.quantity }}">
                </td>
            </tr>
            <tr>
                <td style="text-align: right; padding-right: 15px">领用日期</td>
                <td style="padding-left: 5px">{{ obj.purchase_date | date:"Y-m-d" }}</td>
            </tr>
            <tr>
                <td style="text-align: right; padding-right: 15px">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</td>
                <td>
                        <textarea name="" id="note" cols="30" rows="5"
                                  style="border: none; width: 100%; padding: 5px; outline: none; background: #FFFFFF"
                                  disabled>{{ obj.note }}</textarea>
                </td>
            </tr>
            <tr style="height: auto">
                <td style="text-align: right; padding-right: 15px">资产照片</td>
                <td>
                    {% for file in file_list %}
                        <a href="{{ file.file_path }}" target="_blank"><img src="{{ file.file_path }}" alt="" width="200" height="200"></a>
                    {% endfor %}
                </td>
            </tr>
        </table>
    </div>
{% endblock %}

{% block script %}
    <script>
        window.onload = function () {
            document.getElementById("loading").style.display = "none";
            document.getElementById("zichan").className = "add_class";
            document.getElementById("assets_management").className = "add-nav-active";
        };
    </script>
{% endblock %}
